﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Repository.Core.Models.Dto
{
    public class WorkItemDto
    {
        [JsonIgnore]
        public string? OwnerID { get; set; }

        [JsonIgnore]
        public string? OwnerName { get; set; }

        [Key]
        [Display(Name = "名称", ShortName = "名称")]
        [Required(ErrorMessage = "名称必须填写")]
        [JsonProperty("name")]
        [Column("name")]
        public string Name { get; set; }

        [Display(Name = "命令描述", ShortName = "命令描述"), MaxLength(500)]
        [JsonProperty("description")]
        [Column("description")]
        public string? Description { get; set; }

        [Display(Name = "提交", ShortName = "提交"), Editable(false)]
        [JsonProperty("submitted")]
        [Column("submitted")]
        public bool Submitted { get; set; }


        [JsonProperty("content")]
        public object Content { get; set; }
    }
}
